package com.gaussian.property.module.biz.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gaussian.property.module.biz.entity.ProjectMessage;
import com.gaussian.property.module.biz.vo.message.PageQueryMessageRequestDto;
import com.gaussian.property.module.biz.vo.message.PageQueryMessageResponse;
import com.gaussian.property.module.biz.vo.message.ProjectMessageDto;
import com.songqi.common.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 项目的留言 Mapper 接口
 * </p>
 *
 * @author songqi(13776346982)
 * @since 2024-04-19
 */

@Mapper
public interface ProjectMessageMapper extends BaseMapperX<ProjectMessage> {


    /**
     * 查询项目的留言
     * @param startTime
     * @param endTime
     * @param projectId
     * @return
     */
    List<ProjectMessageDto> queryProjectMessage(@Param("startTime") LocalDateTime startTime,
                                                @Param("endTime") LocalDateTime endTime,
                                                @Param("projectId") String projectId);

    /**
     * 查询项目的留言
     * @param iPage
     * @param queryRequest
     * @return
     */
    IPage<PageQueryMessageResponse> pageQueryProjectMessage(IPage<PageQueryMessageResponse> iPage, @Param("params") PageQueryMessageRequestDto queryRequest);
}
